package android.slc.module.component.image_loader;


import cn.hutool.core.thread.ThreadUtil;

import java.util.concurrent.ThreadPoolExecutor;

class ImageLoaderExecutorService {
    private static class Holder {
        private static final ImageLoaderExecutorService INSTANCE = new ImageLoaderExecutorService();
    }

    public static ImageLoaderExecutorService getInstance() {
        return Holder.INSTANCE;
    }

    private final ThreadPoolExecutor threadPoolExecutor;

    private ImageLoaderExecutorService() {
        this.threadPoolExecutor = ThreadUtil.newExecutor(2, 10);
    }

    public ThreadPoolExecutor getThreadPoolExecutor() {
        return threadPoolExecutor;
    }
}
